{% extends '::cdominguezbase.html.twig' %}
{% set active = 'MiDinero' %}
{% spaceless %}
    {% block stylesheets %}
        {{ parent() }}
        <!-- Chosen Plugin -->
        <link rel="stylesheet" href="{{ asset('bundles/basejqueryui/plugins/chosen/chosen.css') }}" media="screen" />
    {% endblock %}

    {% block javascripts %}
        {{ parent() }}
        <script type="text/javascript" src="{{ asset('bundles/basejqueryui/jui/js/jquery.ui.spinner.min.js') }}"></script>
        <script type="text/javascript" src="{{ asset('bundles/basejqueryui/jui/js/jquery.ui.timepicker.min.js') }}"></script>

        <script type="text/javascript">
            
            //Crea el chosen para el index
            {#$("#form-add-gasto select").chosen();#}

            //Agregar la informacion del browser
            $.each($.browser, function(i, val) {
                $("<div><b>" + i + " : </b><span>" + val + "</span>")
                    .appendTo($('#browserData'));
            });

            var _cdominguez = {
                'urls'         : {
                    'add'                   : '{{ path('cd_add_gasto') }}',
                    'getOptGDetallesByCat'  : '{{ path('cd_get_opt_gdetalles_by_cat') }}'
                }
            };

            //Variable declarada en el Twig base.
            _app.urls.images.color = {
                'calendar'  :   '{{ asset('images/icons/color/16/calendar.png') }}'
            };
        </script> 
        <script type="text/javascript" src="{{ asset('bundles/mysitecdominguez/js/miDinero.js') }}" ></script>

    {% endblock %}

    {% block cdBreadCrumb %}
        <li class="active">
            <span>
                <img src="{{ asset('images/icons/color/16/money.png') }}" alt="Home" />
                Mi dinero
            </span>
        </li>
    {% endblock %}

    {% block cdContentArea %}
        <div class="grid_4">
            <div class="da-panel">
                <div class="da-panel-header">
                    <span class="da-panel-title">
                        <img src="{{ asset('images/icons/color/16/config.png') }}" >
                        Configuarar
                    </span>
                </div>
                <div class="da-panel-content" >
                    <div id="msg">
                        {% if saveData == 1 %}
                            <div class="da-message success">Los datos se guardaron correctamente</div>
                        {% endif %}
                    </div>
                    <form class="da-form" action="{{path('cd_set_mi_dinero')}}" id="form-mi-dinero" method="POST" novalidate="novalidate">
                        <div class="da-form-row">
                            <label><span class="required">* </span>¿C&uacute;anto tengo?</label>
                            <div class="da-form-inline">
                                <input name="_cantidad" type="text" id="_cantidad" value="0" >
                                <label id="label_cantidad" for="_cantidad" class="error" style="display: none">Ingrese la cantidad.</label>
                            </div>
                        </div>
                        <div class="da-form-row" id="browserData">
                            <input type="button" value="Ok" class="da-button blue" onclick="validateForm(true)" style="float: right;" >
                        </div>
                    </form>
                </div>
            </div>
        </div>
    {% endblock %}
{% endspaceless %}